/*
** Lua binding: fontscript
** Generated automatically by tolua++-1.0.92 on Thu Jun  3 13:12:27 2010.
*/

#ifndef __cplusplus
#include "stdlib.h"
#endif
#include "string.h"

#include "tolua++.h"

/* Exported function */
TOLUA_API int  tolua_fontscript_open (lua_State* tolua_S);

#include "lua_font.h"

/* function to register type */
static void tolua_reg_types (lua_State* tolua_S)
{
}

/* get function: G3FS_NumChars */
#ifndef TOLUA_DISABLE_tolua_get_NumChars
static int tolua_get_NumChars(lua_State* tolua_S)
{
  tolua_pushnumber(tolua_S,(lua_Number)G3FS_NumChars);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: G3FS_NumChars */
#ifndef TOLUA_DISABLE_tolua_set_NumChars
static int tolua_set_NumChars(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  G3FS_NumChars = ((int)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: G3FS_NumCharsPerRow */
#ifndef TOLUA_DISABLE_tolua_get_NumCharsPerRow
static int tolua_get_NumCharsPerRow(lua_State* tolua_S)
{
  tolua_pushnumber(tolua_S,(lua_Number)G3FS_NumCharsPerRow);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: G3FS_NumCharsPerRow */
#ifndef TOLUA_DISABLE_tolua_set_NumCharsPerRow
static int tolua_set_NumCharsPerRow(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  G3FS_NumCharsPerRow = ((int)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: G3FS_NumCharStart */
#ifndef TOLUA_DISABLE_tolua_get_NumCharStart
static int tolua_get_NumCharStart(lua_State* tolua_S)
{
  tolua_pushnumber(tolua_S,(lua_Number)G3FS_NumCharStart);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: G3FS_NumCharStart */
#ifndef TOLUA_DISABLE_tolua_set_NumCharStart
static int tolua_set_NumCharStart(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  G3FS_NumCharStart = ((int)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: G3FS_CharWidth */
#ifndef TOLUA_DISABLE_tolua_get_CharWidth
static int tolua_get_CharWidth(lua_State* tolua_S)
{
  tolua_pushnumber(tolua_S,(lua_Number)G3FS_CharWidth);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: G3FS_CharWidth */
#ifndef TOLUA_DISABLE_tolua_set_CharWidth
static int tolua_set_CharWidth(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  G3FS_CharWidth = ((int)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: G3FS_CharHeight */
#ifndef TOLUA_DISABLE_tolua_get_CharHeight
static int tolua_get_CharHeight(lua_State* tolua_S)
{
  tolua_pushnumber(tolua_S,(lua_Number)G3FS_CharHeight);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: G3FS_CharHeight */
#ifndef TOLUA_DISABLE_tolua_set_CharHeight
static int tolua_set_CharHeight(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  G3FS_CharHeight = ((int)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: G3FS_CharSet */
#ifndef TOLUA_DISABLE_tolua_get_CharSet
static int tolua_get_CharSet(lua_State* tolua_S)
{
  tolua_pushnumber(tolua_S,(lua_Number)G3FS_CharSet);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: G3FS_CharSet */
#ifndef TOLUA_DISABLE_tolua_set_CharSet
static int tolua_set_CharSet(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  G3FS_CharSet = ((int)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: G3FS_Spacing */
#ifndef TOLUA_DISABLE_tolua_get_Spacing
static int tolua_get_Spacing(lua_State* tolua_S)
{
  tolua_pushnumber(tolua_S,(lua_Number)G3FS_Spacing);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: G3FS_Spacing */
#ifndef TOLUA_DISABLE_tolua_set_Spacing
static int tolua_set_Spacing(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  G3FS_Spacing = ((float)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* function: FS_SetBitmap */
#ifndef TOLUA_DISABLE_tolua_fontscript_SetBitmap00
static int tolua_fontscript_SetBitmap00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isstring(tolua_S,1,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const char* aFilename = ((const char*)  tolua_tostring(tolua_S,1,0));
  {
   FS_SetBitmap(aFilename);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetBitmap'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* Open function */
TOLUA_API int tolua_fontscript_open (lua_State* tolua_S)
{
 tolua_open(tolua_S);
 tolua_reg_types(tolua_S);
 tolua_module(tolua_S,NULL,1);
 tolua_beginmodule(tolua_S,NULL);
  tolua_variable(tolua_S,"NumChars",tolua_get_NumChars,tolua_set_NumChars);
  tolua_variable(tolua_S,"NumCharsPerRow",tolua_get_NumCharsPerRow,tolua_set_NumCharsPerRow);
  tolua_variable(tolua_S,"NumCharStart",tolua_get_NumCharStart,tolua_set_NumCharStart);
  tolua_variable(tolua_S,"CharWidth",tolua_get_CharWidth,tolua_set_CharWidth);
  tolua_variable(tolua_S,"CharHeight",tolua_get_CharHeight,tolua_set_CharHeight);
  tolua_variable(tolua_S,"CharSet",tolua_get_CharSet,tolua_set_CharSet);
  tolua_variable(tolua_S,"Spacing",tolua_get_Spacing,tolua_set_Spacing);
  tolua_function(tolua_S,"SetBitmap",tolua_fontscript_SetBitmap00);
 tolua_endmodule(tolua_S);
 return 1;
}


#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
 TOLUA_API int luaopen_fontscript (lua_State* tolua_S) {
 return tolua_fontscript_open(tolua_S);
};
#endif

